<?php
namespace core\tv\logic;

use core\Logic;
use core\tv\model\VideoModel;

class VideoSourceLogic extends Logic
{

    /**
     * 获取视频选择列表
     * 
     * @param 
     * @return 
     */
    public function getVideoSelect()
    {
        return VideoModel::getInstance()
        ->order('sort Desc')
        ->field('id as value,video_name as name')
        ->select();
    }

    /**
     * 获取资源状态单选
     * 
     * @return array
     */
    public function getSourceStatus()
    {
        return [
            [
                'name'  => '正常',
                'value' => 1
            ],
            [
                'name'  => '禁用',
                'value' => 0
            ]
        ];
    }

}
